<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:comp="http://java.sun.com/jsf/composite/componentes"
	xmlns:jstl="http://java.sun.com/jsp/jstl/core"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
<f:view>
	<h:head>
		<meta http-equiv="Content-Type"
			content="text/html; charset=ISO-8859-1"></meta>
		<title>Cloud Shop - Uma Chuva de Ofertas pra Você!</title>
		<link href="#{request.contextPath}/bootstrap/css/bootstrap.css"
			rel="stylesheet"></link>
		<link href="#{request.contextPath}/bootstrap/css/bootstrapwact.css"
			rel="stylesheet"></link>
		<link href="#{request.contextPath}/bootstrap/css/main.css"
			rel="stylesheet"></link>
		<link href="#{request.contextPath}/bootstrap/css/jquery.rating.css"
			rel="stylesheet"></link>

		<script src="#{request.contextPath}/bootstrap/js/bootstrap.min.js"></script>
		<script
			src="#{request.contextPath}/bootstrap/js/jquery.rating.pack.js"></script>
		<script>
			
		</script>
		<h:outputScript name="valida.js" library="js"></h:outputScript>
		<h:outputScript name="locale-primefaces.js" library="js"></h:outputScript>
		<h:outputScript library="primefaces" name="jquery/jquery.js"
			target="head">
		</h:outputScript>
		<h:outputScript target="head">
		    $ = jQuery;
		</h:outputScript>

	</h:head>

	<h:body>
		<div class="container">
			<div class="row">
				<div class="span5">
					<a href="index.xhtml"> <img alt="Home"
						src="#{request.contextPath}/image/logoCloudShop.png"
						style="width: 300px; height: 100px;"></img>
					</a>
				</div>
				<div class="span3">
					<h:form class="navbar-search">
						<h:outputLabel value="Cidades:"></h:outputLabel>
						<p:selectOneMenu id="comboSelecionarCidade"
							value="#{indexBean.cidade}">
							<f:selectItem itemLabel="Selecione"></f:selectItem>
							<f:selectItem itemLabel="Curitiba" itemValue="Curitiba"></f:selectItem>
							<f:selectItem itemLabel="Sao Paulo" itemValue="Sao Paulo"></f:selectItem>
							<f:selectItem itemLabel="Rio de Janeiro"
								itemValue="Rio de Janeiro"></f:selectItem>
							<f:selectItem itemLabel="Belo Horizonte"
								itemValue="Belo Horizonte"></f:selectItem>
							<p:ajax listener="#{indexBean.listarOfertas}" update="@all"></p:ajax>
						</p:selectOneMenu>
					</h:form>
				</div>
				<div class="span4">
					<ul>
						<h:form class="bs-example form-horizontal">
							<h:messages showDetail="true"></h:messages>
							<div>
								<a href="cadastrocliente.xhtml"><h:outputLabel
										value="Cadastre-se:" rendered="#{clienteBean.flagLogin}"></h:outputLabel>
								</a>
							</div>
							<h:inputText id="emailLogar"
								value="#{clienteBean.clienteSelecionado.emailCliente}"
								required="true" placeholder="Digite seu email"
								rendered="#{clienteBean.flagLogin}"></h:inputText>
							<p></p>
							<h:inputSecret id="senhaLogar"
								value="#{clienteBean.clienteSelecionado.senhaCliente}"
								required="true" placeholder="Digite sua senha"
								rendered="#{clienteBean.flagLogin}"></h:inputSecret>
							<h:commandButton class="btn btn-primary btn-small search_btn"
								value="Entrar" action="#{clienteBean.logar}"
								rendered="#{clienteBean.flagLogin}"
								style="margin-left:5px !important"></h:commandButton>
						</h:form>
						<div class="span3">

							<h:form>
								<h4>
									<h:outputText
										value="Seja Bem Vindo #{clienteBean.clienteSelecionado.nomeCliente}"
										rendered="#{clienteBean.flagAreaUsuario}"></h:outputText>
										<p />
								</h4>
								<p:menubar rendered="#{clienteBean.flagAreaUsuario}">
									<p:submenu label="Minha Conta" icon="ui-icon-pencil">
										<p:menuitem value="Meus Pedidos" url="#" />
										<p:menuitem value="Meus Dados" url="areacliente.xhtml" />
										<p:menuitem value="Sair" actionListener="#{clienteBean.logout}" />
									</p:submenu>
								</p:menubar>
							</h:form>
						</div>
					</ul>
				</div>
			</div>
			<div class="row">
			<p />
				<div class="span12">
					<div class="navbar">
						<div class="navbar-inner">
							<div class="container" style="width: auto;">
								<a class="btn btn-navbar" data-toggle="collapse"
									data-target=".nav-collapse"> <span class="icon-bar"></span>

									<span class="icon-bar"></span> <span class="icon-bar"></span>
								</a>
								<div class="nav-collapse">
									<ul class="nav">
										<li><a href="comerebeber.xhtml">Comer e Beber</a></li>
										<li><a href="entretenimento.xhtml">Entretenimento</a></li>
										<li><a href="bemestar.xhtml">Bem Estar</a></li>
										<li><a href="diversos.xhtml">Diversos</a></li>
									</ul>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
			<h:messages id="messages" showDetail="true" />
			<div class="row" style="margin-left: 0px !important">
				<ui:insert name="coluna_central">
				</ui:insert>
			</div>

			<footer>
				<div class="row well no_margin_left">

					<div class="span3">
						<h4>Informacoes</h4>
						<ul>
							<li><a href="cadastroempresa.xhtml">Anuncie no CloudShop</a></li>
							<li><a href="cadastrooferta.xhtml">Area de Administrador</a></li>
							<li><a href="areacliente.xhtml">Area do cliente</a></li>
							<li><a href="">..............</a></li>
						</ul>
					</div>
					<div class="span3"></div>

					<div class="span3"></div>

					<div class="span2"></div>
				</div>
			</footer>
		</div>
	</h:body>
</f:view>

</html>
